<% content_for(:favicon_path) { deploy_favicon_path(@deploy) } %>

<% page_title deploy_page_title %>

<%= breadcrumb @project, @deploy.stage, "Deploy ##{@deploy.id}" %>

<div id="header" class="stream-header">
  <%= render 'header' %>
</div>

<%= Samson::Hooks.render_views(:deploy_show_view, self, deploy: @deploy) %>

<ul id="deploy-tabs" class="nav nav-tabs" data-changeset-url="<%= changeset_project_deploy_url(@project, @deploy, with_deleted: params[:with_deleted]) %>">
  <li class="active"><a href="#output" data-toggle="tab">Output</a></li>

  <%= render 'changeset/tab_list' %>

  <li><a href="#viewers" data-toggle="tab" id="viewers-link">Viewers <span class="badge">0</span></a></li>
</ul>

<section class="clearfix tabs">
  <div class="tab-content deploy-details">
    <div class="tab-pane active" id="output" data-desktop-notify="<%= current_user.desktop_notify? %>">
      <%= deploy_output %>
    </div>
    <div class="tab-pane changeset-placeholder">Loading...</div>
    <div class="tab-pane" id="viewers">
      No other viewers.
    </div>
  </div>
</section>

<%= render 'shared/output_stream', job: @deploy.job %>
